#!/usr/bin/env python
#-*- coding:utf-8 -*-

# file:insecure_courseOtherResource.py
# author:86133
# datetime:2022/6/20 18:36
# software: PyCharm
'''
this is functiondescription
'''
from flask_restful import Resource, reqparse
from flask import jsonify

from app.utils import commons
from app.controller.courseController import CourseController
from app.utils.response_code import RET

class InsecureCourseOtherResource(Resource):

    @classmethod
    def sql_get(cls):
        parser = reqparse.RequestParser()
        parser.add_argument('courseID', location='args', required=False, help='courseID参数类型不正确或缺失')
        kwargs = parser.parse_args()
        res = CourseController.sql_get(**kwargs)
        if res:
            return jsonify(code=res['code'], message=res['message'], data=res['data'])
        else:
            return jsonify(code=res['code'], message=res['message'], data=res['data'])
